import React from 'react'
import { useParams, useSearchParams } from 'react-router-dom'
export default function Detail() {
  // const params = useParams()
  // console.log(params)

  const [query, setQuery] = useSearchParams()
  console.log(query)
  console.log(query.get('name'))
  console.log(query.get('age'))
  return (
    <div>
      详情页
      <button
        onClick={() => {
          setQuery('name=ls&age=99')
        }}
      >
        修改查询字符串
      </button>
    </div>
  )
}
